<?php
/**
 * Created by PhpStorm.
 * Loan: Administrator
 * Date: 2020/3/6 0006
 * Time: 14:58
 */

namespace app\api\controller;


use think\Controller;
use think\facade\Hook;

//基类控制器
class Base extends Controller
{
    /**
     * @return bool|void
     * @author ASUS
     * @date 2020-08-25 10:25
     * 基类控制器
     * 跨域验证，token验证，权限验证
     */
    public function initialize()
    {
        header('Content-Type: text/html;charset=utf-8');// *代表允许任何网址请求
        header('Access-Control-Allow-Origin:*');
        header("Access-Control-Allow-Headers:Origin, X-Requested-With, Content-Type, Accept,USER_ID,TOKEN");
        header("Access-Control-Allow-Methods:HEAD, GET, POST, DELETE, PUT, OPTIONS");
    }
}